    function ajax(url, param, async = true, mode = 99) {
    $.ajax({
        type: "post",
        dataType: 'json',
        url: url,
        data: JSON.stringify(param),
        contentType: "application/json;charset=UTF-8",
        cache: false,
        async: async,
        success: function (data) {
            switch (mode) {
                case 1:
                    loginResult(data);
                    break;
                default:
                    simpleResponse(data);
                    break
            }
        }
    });
}
const SUCCESS = "00000000";
// 登录结果
function loginResult(data) {
    if (SUCCESS === data.RSPCD) {
        errorMsg("登录成功", type.SUCCESS);
        //一般网页登陆之后，账号和用户信息存储在哪？
        // 是存储本地在cookie、sessionStorage、localStorage里面。
        localStorage.setItem("USER",toJsonStr(data.BODY))
        setTimeout(function () {
            window.location.href = "/index";
        },1000)
    } else {
        errorMsg(data.RSPMSG,type.DANGER)
    }

}